#include <bits/stdc++.h>
#define lsrs int ls=p<<1;int rs=ls|1;

using namespace std;

const int maxn=200005;
struct P{
	int x,y;
	P(int x,int y):x(x),y(y){}
	const bool operator < (const P &p) const { return x<p.x;}
};
P pts[maxn];
int seg[4*maxn],laz[4*maxn];
int bg,ed,val;

inline void pushdown(int p){
	lsrs;
	laz[ls]=laz[rs]=laz[p];
	seg[ls]+=laz[p];
	seg[rs]+=laz[p];
	laz[p]=0;
}
void modify(int p,int l,int r){
	if(laz[p]&&l!=r) pushdown(p);
	if(bg<=l&&ed>=r){
		laz[p]=val;
		seg[p]+=laz[p];
	}else{
		int mid=(l+r)>>1;
		lsrs;
		if(ed<=mid) modify(ls,l,mid);
		if(bg>mid) modify(rs,mid+1,r);
	}
}
int query(int p,int l,int r){
	if(bg<=l&&ed>=r) return seg[p];
	int mid=(l+r)>>1;
	lsrs;
	if(bg>mid) return query(rs,mid+1,r);
	else if(ed<=mid) return query(ls,l,mid);
	return min(query(rs,mid+1,r),query(ls,l,mid));
}


int main(){
	int n;
}



